home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-03-19 | 1.5 KB | 45 lines | [TEXT/R*ch] |
- /*
- ** Copyright: © Michael S. Engber, 1994. All Rights Reserved.
- **
- ** Project Data for SpaceWars
- **
- ** This project illustrates the differences between different
- ** ways of storing data in your package.
- **
- ** package size in bytes
- ** uncompressed compressed
- ** Data Structure (on Mac) (on Newton)
- ** -------------------- ------------ -----------
- ** array of frames (naive) 35538 11884
- ** array of frames (map sharing) 25970 8932
- ** array of arrays 25866 8860
- ** frame of frames 22386 9176
- ** binary object 9962 5328
- ** soup 37260
- ** store part 35012 14900
- **
- */
-
- constant kAppString := "SpaceWars:Avarice";
-
-
- Load(Home & ":Data.f");
- Load(Home & ":DataUtils.f");
-
- constant kDataStructure := 'ArrayOfFramesCommonMap;
-
- if kDataStructure = 'ArrayOfFramesNaive then
- DefConst('kData,gData)
- else if kDataStructure = 'ArrayOfFramesCommonMap then
- DefConst('kData,CloneWithCommonMap(gData))
- else if kDataStructure = 'ArrayOfArrays then
- DefConst('kData,DataToArrays(gData))
- else if kDataStructure = 'FrameOfFrames then
- DefConst('kData,DataToFrame(gData))
- else if kDataStructure = 'BinObj then
- DefConst('kData,DataToBinObj(gData))
- else
- Throw('|evt.ex.msg|,"bad kDataStructure");
-
- "Reg the Llama";
-